package com.weblog.search.dao;

import com.weblog.search.pojo.Article;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2019/9/2816:57
 */

public interface ArticleDao extends ElasticsearchRepository<Article, String> {


    /**
     * 查询热门文章中的前20篇，按点赞数降序排列
     * @param ishot
     * @return
     */
    List<Article>findTop20ByIshotAndStateOrderByThumbupDesc(String ishot, String state);

}
